package hu.ikti.oamadmin.beans.utils;

import java.io.Serializable;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date;

import org.jboss.seam.ScopeType;
import org.jboss.seam.annotations.Name;
import org.jboss.seam.annotations.Scope;

@Name("dateHelper")
@Scope(ScopeType.CONVERSATION)
public class DateHelper implements Serializable {

	private static final long serialVersionUID = 1L;

	private int day;
	private int month;
	private int year;

	public Date getDate() throws ParseException {
		SimpleDateFormat formatter = new SimpleDateFormat("dd/MM/yyyy");
		String date = day + "/" + month + "/" + year;
		return formatter.parse(date);

	}

	public int getDay() {
		return day;
	}

	public int getMonth() {
		return month;
	}

	public int getYear() {
		return year;
	}

	public void setDay(int day) {
		this.day = day;
	}

	public void setMonth(int month) {
		this.month = month;
	}

	public void setYear(int year) {
		this.year = year;
	}

}
